import type {CacheMap} from '../../../type';

export type SelectShape='round'|'noBorder';
export interface SelectOption extends Record<string,any>{
	_disabled?:boolean;
}
export type SelectRawOption=string|number|SelectOption;
export type SelectOptionValue=string|number;
export interface SelectStandardOption{
	label:string;
	value:SelectOptionValue;
	tag:string;
	disabled:boolean;
	raw:SelectRawOption;
}
export interface SelectStandardData{
	options:SelectStandardOption[];
	cache:CacheMap<SelectOptionValue,SelectStandardOption>;
}
export interface SelectSelectedData{
	selected:null|SelectStandardOption|SelectStandardOption[];
	disabledSelected?:SelectStandardOption[];
	isSelected:(option:SelectStandardOption) => boolean;
}
export interface SelectBeforeProcessor{
	option:SelectStandardOption;
	select:boolean;
}